package com.fz.entity;

/**
 * Created by webrx on 2017-09-09.
 */
public class User {

    private String name;
//销毁方法也只有单例模式才显示
    public void close(){
        System.out.println("destroy-method=\"close\"销毁方法");
    }

    public void init(){

        System.out.println("初始化方法");
    }

    public User(){
        System.out.println("无参构造方法");
    }
    public User(String name){
        this.name=name;
        System.out.println("有参的构造方法");
    }
}
